@extends('base')

@section('style')
    <link rel="stylesheet" href="{{ asset('static/admin/css/other/console1.css') }}">
@endsection

@section('content')
<div>
    <div class="layui-row layui-col-space10">
        <div class="layui-col-xs6 layui-col-md4">
            <div class="layui-card top-panel">
                <div class="layui-card-header">产品数量</div>
                <div class="layui-card-body">
                    <div class="layui-row layui-col-space5">
                        <div class="layui-col-xs8 layui-col-md8 top-panel-number" id="value1">0</div>
                        <div class="layui-col-xs4 layui-col-md4 top-panel-tips" id="value11">0</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-xs6 layui-col-md4">
            <div class="layui-card top-panel">
                <div class="layui-card-header">案例数量</div>
                <div class="layui-card-body">
                    <div class="layui-row layui-col-space5">
                        <div class="layui-col-xs8 layui-col-md8 top-panel-number" id="value2">0</div>
                        <div class="layui-col-xs4 layui-col-md4 top-panel-tips" id="value22">0</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-xs6 layui-col-md4">
            <div class="layui-card top-panel">
                <div class="layui-card-header">文章数量</div>
                <div class="layui-card-body">
                    <div class="layui-row layui-col-space5">
                        <div class="layui-col-xs8 layui-col-md8 top-panel-number" id="value3">0</div>
                        <div class="layui-col-xs4 layui-col-md4  top-panel-tips" id="value33">0</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row layui-col-space10">
        <div class="layui-col-xs6 layui-col-md6">
            <div class="layui-card top-panel">
                <div class="layui-card-header">订单数量</div>
                <div class="layui-card-body">
                    <div class="layui-row layui-col-space5">
                        <div class="layui-col-xs8 layui-col-md8 top-panel-number" id="value4">0</div>
                        <div class="layui-col-xs4 layui-col-md4 top-panel-tips" id="value44">0</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-xs6 layui-col-md6">
            <div class="layui-card top-panel">
                <div class="layui-card-header">留言数量</div>
                <div class="layui-card-body">
                    <div class="layui-row layui-col-space5">
                        <div class="layui-col-xs8 layui-col-md8 top-panel-number" id="value5">0</div>
                        <div class="layui-col-xs4 layui-col-md4 top-panel-tips" id="value55">0</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row layui-col-space10">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">系统信息</div>
                <div class="layui-card-body">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th>属性</th>
                            <th>值</th>
                            <th>属性</th>
                            <th>值</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>操作系统</td>
                            <td>{{ $sysInfo['os'] }}</td>
                            <td>存储空间</td>
                            <td>{{ $sysInfo['space'] }}</td>
                        </tr>
                        <tr>
                            <td>网站域名</td>
                            <td>{{ $sysInfo['addr'] }}</td>
                            <td>运行环境</td>
                            <td>{{ $sysInfo['run'] }}</td>
                        </tr>
                        <tr>
                            <td>PHP版本</td>
                            <td>{{ $sysInfo['php'] }} - {{ $sysInfo['php_run'] }}</td>
                            <td>Laravel版本</td>
                            <td>{{ $sysInfo['laravel'] }}</td>
                        </tr>
                        <tr>
                            <td>执行时间</td>
                            <td>{{ $sysInfo['max'] }}</td>
                            <td>最大上传</td>
                            <td>{{ $sysInfo['upload'] }}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

@section('js')
<script>
    layui.use(['layer','jquery','toast','count'], function() {
        let $ = layui.jquery
        let layer = layui.layer
        let count = layui.count
        let toast = layui.toast;

        count.up("value1", {
            time: 4000,
            num: {$productNum},
            bit: 0,
            regulator: 100
        })

        count.up("value11", {
            time: 4000,
            num: {$productTodayNum},
            bit: 0,
            regulator: 100
        })

        count.up("value2", {
            time: 4000,
            num: {$caseNum},
            bit: 0,
            regulator: 100
        })
        count.up("value22", {
            time: 4000,
            num: {$caseTodayNum},
            bit: 0,
            regulator: 100
        })

        count.up("value3", {
            time: 4000,
            num: {$articleNum},
            bit: 0,
            regulator: 100
        })
        count.up("value33", {
            time: 4000,
            num: {$articleTodayNum},
            bit: 0,
            regulator: 100
        })

        count.up("value4", {
            time: 4000,
            bit: 0,
            num: {$orderNum},
            regulator: 100
        })

        count.up("value44", {
            time: 4000,
            bit: 0,
            num: {$orderTodayNum},
            regulator: 100
        })

        count.up("value5", {
            time: 4000,
            bit: 0,
            num: {$messageNum},
            regulator: 100
        })

        count.up("value55", {
            time: 4000,
            bit: 0,
            num: {$messageTodayNum},
            regulator: 100
        })
    });
</script>
@endsection
